﻿Imports System.Data.OleDb

Public Class ThemSanBay
    Inherits DataProvider
    Public Function Check(ByVal id As String) As Boolean
        Dim sql As String = "SELECT * FROM SANBAY WHERE ID='" + id + "'"
        If GetDT(sql).Tables(0).Rows.Count() = 0 Then
            Return True
        End If
        Return False
    End Function
    Public Function LuuSanBay(ByVal dto_SanBay As DTO.ThemSanBay) As Integer
        Dim sqo As String = "INSERT INTO SanBay(Ten, GhiChu) VALUES('" + dto_SanBay.TenSanBay + "','" + dto_SanBay.GhiChu + "')"
        Return Me.SaveData(sqo)
    End Function
End Class
